import {get, post, del, put} from "../http";

// 创建
export const createChapter = (data) =>
  post('/edu/chapter/create', data)
// 修改
export const updateChapter = (data) =>
  put('/edu/chapter/update', data)
// 删除，根据章节id
export const deleteChapter = (chapterId) =>
  del(`/edu/chapter/delete/${chapterId}`)
// 查询，根据课程id
export const findChapterById = (courseId) =>
  get(`/edu/chapter/findById/${courseId}`)

// 根据id查询章节，不包括小结，根据章节id
export const findChapterOneById = (chapterId) =>
  get(`/edu/chapter/findOneById/${chapterId}`)

